Skip to content

fix(water-caustics): X4000 warnings#2488

Merged
SkrubbySkrubInAShrub merged 1 commit into
community-shaders:devfrom
davo0411:fix/x4000-water-caustics
Jun 8, 2026
Merged

fix(water-caustics): X4000 warnings#2488
SkrubbySkrubInAShrub merged 1 commit into
community-shaders:devfrom
davo0411:fix/x4000-water-caustics

Conversation

@davo0411

@davo0411 davo0411 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Refactor
    • Optimized water caustics computation for improved rendering consistency and performance.

Copilot AI review requested due to automatic review settings June 8, 2026 10:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e938914-a69b-4ef9-9c9e-79d9a7959fbc

📥 Commits

Reviewing files that changed from the base of the PR and between b74dedf and 032fbcf.

📒 Files selected for processing (1)
  • features/Water Effects/Shaders/WaterEffects/WaterCaustics.hlsli

📝 Walkthrough

Walkthrough

The ComputeCaustics function in WaterCaustics.hlsli is refactored to replace conditional const ternary initializations of causticsHigh and causticsLow with explicit mutable float3 variables, conditionally updated based on causticsFade bounds before final interpolation.

Changes

Water Caustics Fade Interpolation

Layer / File(s) Summary
ComputeCaustics fade handling refactoring
features/Water Effects/Shaders/WaterEffects/WaterCaustics.hlsli
causticsHigh and causticsLow are now initialized to 1.0 as mutable variables, then conditionally overwritten when causticsFade > 0.0 or causticsFade < 1.0 respectively, before linear interpolation using lerp(causticsLow, causticsHigh, causticsFade).

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly Related PRs

Suggested Reviewers

  • SkrubbySkrubInAShrub
  • alandtse

Poem

🐰 Where caustics dance in waters deep,
No const could keep their secrets safe—
Now mutable and flow so steep,
Through faded tides they gently chafe.
Lerp smooths the shimmer, bright and fair,

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(water-caustics): X4000 warnings' is specific and directly related to the changeset, clearly indicating a fix for shader compiler warnings in water caustics code.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

No actionable suggestions for changed features.

@SkrubbySkrubInAShrub SkrubbySkrubInAShrub merged commit 4c29232 into community-shaders:dev Jun 8, 2026
12 checks passed
alandtse added a commit to alandtse/open-shaders that referenced this pull request Jun 9, 2026
Adopts the 3 upstream Community Shaders dev fixes landed since v1.7.0-rc.1:
- community-shaders#2488 water-caustics X4000 warnings
- community-shaders#2487 alt-tab CTD with no cursor png (fork ships none)
- community-shaders#2490 water blending + VRAM texture leak (Water RT format-forcing moved to
  Deferred::SetupResources; keep-VR: Water hooks' VR offsets retire with them,
  Precip/Reflections keep theirs)

Merged (not cherry-picked) to preserve upstream commit ancestry for clean
future syncs.

# Conflicts:
#	src/Hooks.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants